import requestArea from "../utils/area";
import { Areas,Header } from "./types/common";
// import  queryfind from "./../views/newtest.vue";

import { IlistParams } from "./types/common";



export const getData = (params: IlistParams) => {
//返回的数据类型
    return requestArea<
    {
        areas: Areas[],
        headers: Header


    }
    >
        (
            {
                method: 'GET',
                url: `/api/Area?Keyword=${params.keyword}&PageNumber=${params.PageNumber}&PageSize=${params.PageSize}&OrderBy=${params.OrderBy}&Desc=${params.Desc}`,
                params

            }
        )
}



// export const  getData=(state:string)=>{

//     return request<{
//         areas:Areas[]

//     }
//     >

//     (
//         {
//             method:'GET',
//             url:`/api/Area?Keyword=${state}&PageNumber=2&PageSize=2`

//         }
//     )
// }

export const getAreaSimplifyName = () => {




    return requestArea<{
        areas: Areas[]
        
    }>(
        {
            method: 'GET',
            url: `/api/Area?Keyword`


        }
    )

}
